package com.alibaba.algo.cooperation.usercomponent.service.app;

import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.common.PagerEntity;
import com.alibaba.algo.cooperation.usercomponent.vo.req.app.CreateAppRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.app.SelectAppListRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.app.UpdateAppRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.app.UpdateAppStateRequestVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 类AppInfoService.java的实现描述：应用 service
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
@FeignClient(url="${feign.userCenterUrl:}", value = "usercenter-service", contextId = "usercenter-app")
public interface AppInfoService {

    @RequestMapping(value = "/appInfo/insert", method = RequestMethod.POST)
    BaseResult<Boolean> insert(@RequestBody CreateAppRequestVO vo);

    @RequestMapping(value = "/appInfo/update", method = RequestMethod.POST)
    BaseResult<Boolean> update(@RequestBody UpdateAppRequestVO vo);

    @RequestMapping(value = "/appInfo/delete", method = RequestMethod.POST)
    BaseResult<Boolean> delete(@RequestBody List<Long> vo);

    @RequestMapping(value = "/appInfo/state/open", method = RequestMethod.POST)
    BaseResult<Boolean> open(@RequestBody UpdateAppStateRequestVO vo);

    @RequestMapping(value = "/appInfo/state/close", method = RequestMethod.POST)
    BaseResult<Boolean> close(@RequestBody UpdateAppStateRequestVO vo);

    @RequestMapping(value = "/appInfo/selectPage", method = RequestMethod.POST)
    BaseResult<PagerEntity> selectPage(@RequestBody SelectAppListRequestVO vo);

}
